﻿using System;
using System.Web.UI;

namespace XYZ_Inventory
{
    public partial class ReportSite : MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string username = Page.User.Identity.Name;
            string role = RoleManager.GetRole(username).ToLower();

            lSuppliersReports.Visible = role == "Purchasing Manager".ToLower() || role == "Managing Director".ToLower();
            lRawMaterialsReports.Visible = role == "Purchasing Manager".ToLower() ||
                                           role == "Managing Director".ToLower() ||
                                           role == "Inventory manager".ToLower();
            lInventoryReport.Visible = role == "Managing Director".ToLower() || role == "Inventory manager".ToLower();
            lBusinessExpansionReports.Visible = role == "Managing Director".ToLower();
        }
    }
}